/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-30 11:01:15
 * @Description  : 日志相关接口
 */
import qs from 'qs'
import type { PageReq } from '@/types/commom'
import type { LogPageRes, LogReq } from '@/types/log'
import request from '@/utils/request'

// 分页查询日志接口
export const getLogByPage = (params?: LogReq) => {
  // const newParams = qs.stringify(params, { arrayFormat: 'repeat' })
  return request.get<LogPageRes>('/log/list', { params })
}

// 分页查询用户日志接口
export const getUserLogByPage = (params?: LogReq) => {
  return request.get<LogPageRes>('/log/user/list', { params })
}

// 分页查询用户的登录设备接口
export const getLogDeviceByPage = (params?: PageReq) => {
  return request.get<LogPageRes>('/log/device/list', { params })
}
